<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>机构团队待审核</title>
    <%@ include file="../../common/meta.jsp" %>
    <%@ include file="../../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-list.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/page/common-search.css?t=${now}" rel="stylesheet">
    <style>
    </style>
</head>
<script>
    var searchInfo = ${searchInfo};
    var checkResultTypeMap = ${checkResultTypeMap};
    var defLogInfo = ${defLogInfo};
    var checkTypeMap = '${checkTypeMap}';
</script>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="tabs-container">
        <ul class="nav nav-tabs">
        <c:if test="${not empty defLogInfo && defLogInfo.hasOrg == 1}">
            <li class="">
                <a href="${ctx}/checkApp/checkDocOrg/checkDocOrgPage?hasTeam=${not empty defLogInfo ? defLogInfo.hasTeam : 0}&hasOrg=${not empty defLogInfo ? defLogInfo.hasOrg : 0}&hasApp=${not empty defLogInfo ? defLogInfo.hasApp : 0}">机构服务</a>
            </li>
        </c:if>
            <li class="active">
                <a href="${ctx}/checkApp/checkDocTeam/checkDocTeamPage?hasTeam=${not empty defLogInfo ? defLogInfo.hasTeam : 0}&hasOrg=${not empty defLogInfo ? defLogInfo.hasOrg : 0}&hasApp=${not empty defLogInfo ? defLogInfo.hasApp : 0}">机构团队</a>
            </li>
        <c:if test="${not empty defLogInfo && defLogInfo.hasApp == 1}">
            <li class="">
                <a href="${ctx}/checkApp/checkDocApp/checkDocAppPage?hasTeam=${not empty defLogInfo ? defLogInfo.hasTeam : 0}&hasOrg=${not empty defLogInfo ? defLogInfo.hasOrg : 0}&hasApp=${not empty defLogInfo ? defLogInfo.hasApp : 0}">机构专家</a>
            </li>
        </c:if>
        </ul>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-search"></i> 筛选查询</h5>
                    </div>
                    <div class="ibox-content ibox-content-search">
                        <form class="form-horizontal m-t" id="searchForm" novalidate="novalidate">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">审核状态：</label>
                                <div class="col-sm-2">
                                    <select class="form-control" name="status" id="status" onchange="changeStatus(this.value)">
                                        <c:forEach items="${checkStatus}" var="item">
                                            <option value="${item.key}" ${not empty searchInfo && searchInfo.status == item.key ? 'selected' : '' } >${item.value}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">查询团队：</label>
                                <div class="col-sm-2">
                                    <input type="text" name="teamName" value="${not empty searchInfo ? searchInfo.teamName : ''}" onkeydown="if(event.keyCode==13){doRefresh();return false;}" id="teamName" class="form-control"  placeholder="输入团队名称" maxlength="8">
                                </div>
                                <label class="col-sm-1 control-label">查询机构：</label>
                                <div class="col-sm-2">
                                    <div class="input-group">
                                        <input class="hideItem" id="orgCode" value="${not empty searchInfo ? searchInfo.orgCode : ''}" name="orgCode">
                                        <input type="text" id="orgName" placeholder="输入机构名称" value="${not empty searchInfo ? searchInfo.orgName : ''}" name="orgName" class="form-control" maxlength="20">
                                        <div class="input-group-btn">
                                            <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                                <span class="caret"></span>
                                            </button>
                                            <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="ibox-tools ibox-tools-search">
                                    <button type="button" class="btn btn-primary btn-outline" onclick="doRefresh()">查询</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="doReset('searchForm')">重置</button>
                                    <button type="button" class="btn btn-primary btn-outline" onclick="openSearchTools();"><i class="fa fa-caret-down"></i></button>
                                </div>
                            </div>
                            <div class="search-tools">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">团队长：</label>
                                    <div class="col-sm-4">
                                        <input type="text" name="docName" value="${not empty searchInfo ? searchInfo.docName : ''}" onkeydown="if(event.keyCode==13){doRefresh();return false;}" id="docName" class="form-control"  placeholder="输入团队长姓名" maxlength="8">
                                    </div>

                                    <label class="col-sm-1 control-label">审核类型：</label>
                                    <div class="col-sm-3">
                                        <select class="form-control" name="checkType" id="checkType" onchange="doRefresh()">
                                            <option value="">--请选择--</option>
                                            <c:forEach items="${checkTypeMap}" var="item">
                                                <option value="${item.key}" ${not empty searchInfo && searchInfo.checkType == item.key ? 'selected' : '' } >${item.value}</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div id="unCheckDiv">
                                        <label class="col-sm-1 control-label">提交时间：</label>
                                        <div class="col-sm-4">
                                            <input placeholder="提交时间" value="${not empty searchInfo ? searchInfo.timeInterval : ''}" class="form-control layer-date" id="timeInterval" name="timeInterval">
                                        </div>
                                    </div>
                                    <div id="checkDiv">
                                        <label class="col-sm-1 control-label">审核时间：</label>
                                        <div class="col-sm-4">
                                            <input placeholder="审核时间" value="${not empty searchInfo ? searchInfo.timeInterval1 : ''}" class="form-control layer-date" id="timeInterval1" name="timeInterval1">
                                        </div>
                                    </div>
                                    <div id="checkTypeDiv">
                                        <label class="col-sm-1 control-label">审核结果：</label>
                                        <div class="col-sm-3">
                                            <select class="form-control" name="result" id="results" onchange="doRefresh()">
                                                <option value="">--请选择--</option>
                                                <c:forEach items="${checkResultTypeMap}" var="item">
                                                    <option value="${item.key}" ${not empty searchInfo && searchInfo.result == item.key ? 'selected' : '' } >${item.value}</option>
                                                </c:forEach>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><i class="fa fa-table"></i> 专家信息</h5>
                        <div class="ibox-tools col-sm-offset-2">
                            <button id="detailBtn" class="btn btn-primary btn-outline" onclick="openCheckInfoPage()">查看</button>
                            <c:if test="${userType == 'super' || not empty btnMap['checkOrgTeam']}">
                                <button id="checkBtn" class="btn btn-primary btn-outline" onclick="openCheckDocPage()">审核</button>
                            </c:if>
                            <button class="btn btn-primary btn-outline" onclick="doRefresh()">刷新</button>
                        </div>
                    </div>
                    <div id="unCheckTable" class="ibox-content">
                        <table class='table table-striped table-hover'
                               id="dataTable" data-height="370"
                               data-toggle="table"
                               data-url="${ctx}/checkApp/checkDocTeam/pageFindCheckedOrgTeamData?t=${now}"
                               data-pagination="true"
                               data-side-pagination="server"
                               data-striped="true"
                               data-response-handler="handleServerResult"
                               data-query-params-type=""
                               data-query-params="getParams"
                               data-page-number="${not empty searchInfo.pageNo ? searchInfo.pageNo : 1}"
                               data-page-size="${not empty searchInfo.pageSize ? searchInfo.pageSize : defaultPageSize}"
                               data-page-list="${pageList}">
                            <thead>
                            <tr>
                                <th data-field="id" data-visible="false">主键id</th>
                                <th data-field="checkType" data-formatter="formatCheckType" data-align="center" data-width="120px">审核类型</th>
                                <th data-field="teamName" data-formatter="formatName" data-events="actionEvents" data-align="center" data-width="250px">团队名称</th>
                                <th data-field="docName" data-events="actionEvents" data-align="center" data-width="200px">团队长姓名</th>
                                <th data-field="orgName" data-align="center">机构名称</th>
                                <th data-field="operatorCommit"  data-align="center" data-width="150px">提交人</th>
                                <th data-field="gmtPublish"  data-align="center" data-width="150px">提交时间</th>
                                <%--data-formatter="formatterCommit"--%>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div id="checkTable" class="ibox-content">
                        <table class='table table-striped table-hover'
                               id="dataTable1" data-height="370"
                               data-toggle="table"
                               data-url="${ctx}/checkApp/checkDocTeam/pageFindCheckedOrgTeamPublishData?t=${now}"
                               data-pagination="true"
                               data-side-pagination="server"
                               data-striped="true"
                               data-response-handler="handleServerResult"
                               data-query-params-type=""
                               data-query-params="getParams"
                               data-page-number="${not empty searchInfo.pageNo ? searchInfo.pageNo : 1}"
                               data-page-size="${not empty searchInfo.pageSize ? searchInfo.pageSize : defaultPageSize}"
                               data-page-list="${pageList}">
                            <thead>
                            <tr>
                                <th data-field="id" data-visible="false">主键id</th>
                                <th data-field="result" data-formatter="formatCheckResultType" data-align="center" data-width="100px">审核结果</th>
                                <th data-field="checkType" data-formatter="formatCheckType" data-align="center" data-width="120px">审核类型</th>
                                <th data-field="teamName" data-formatter="formatName" data-events="actionEvents" data-align="center" data-width="220px">团队名称</th>
                                <th data-field="docName" data-events="actionEvents" data-align="center" data-width="120px">团队长姓名</th>
                                <th data-field="orgName" data-align="center">机构名称</th>
                                <th data-field="operatorCommit" data-formatter="formatterCommit" data-align="center" data-width="120px">提交人</th>
                                <th data-field="operator" data-formatter="formatterCheck" data-align="center" data-width="120px">审核人</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="text-center">${companyName}</div>
            </div>
        </div>
    </div>
</div>

<script src="${ctx}/js/check/docOrg/checkDocTeamMgr.js?t=${now}"></script>
</body>
</html>
